package com.skh.hdevboard;

import com.kaihong.template.opinterface.BleOperatorAbility;
import com.kaihong.template.opinterface.CommonOperatorAbility;
import ohos.aafwk.ability.AbilityPackage;

public class MyApplication extends AbilityPackage {
    @Override
    public void onInitialize() {
        super.onInitialize();
        // 必须在config配置之后初始化
        initOperator();
    }

    @Override
    public void onEnd() {
        super.onEnd();
        releaseOperator();
    }

    private void initOperator() {
        BleOperatorAbility.register(this);
        CommonOperatorAbility.register(this);
    }

    private void releaseOperator() {
        BleOperatorAbility.unregister();
        CommonOperatorAbility.unregister();
    }
}
